﻿using System;
using System.Collections.Generic;
using System.Threading;
using test.kafka;

namespace kafka_consumer
{
    class Program
    {
        static void Main(string[] args)
        {
            ConsumerConfig consumerConfig = new ConsumerConfig
            {
                KafkaServer = "121.199.64.205:19092",
                Topics = new List<string> { "liuzw_test" },
                GroupId = "testgroup"
            };

            KafkaConsumer consumer = new KafkaConsumer(consumerConfig);
            consumer.Consume(DoSomething);
            Thread.Sleep(999999999);
        }

        private static string DoSomething(string message)
        {
            string a = message;
            return a;
        }
    }
}
